home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Telnet 2.6.1d1 4⁄26⁄94 Folder / source / vs / wind.h < prev   
Text File  |  1994-02-12  |  5KB  |  141 lines

  1. /*
  2.  *        MacLook Window Management Data Structure Definition
  3.  */
  4.  
  5. #include "kerberos.h" 
  6.  
  7. #define MAXFTP    128            /* BYU mod */
  8. #define    MAXKB    256            /* BYU mod */
  9.  
  10. #define TYPE_I_ON_CLOSE    1    /* BYU mod */
  11. #define CAPTURE_DATA    2    /* BYU mod */
  12. #define MGET_STATE        4    /* BYU LSC */
  13. #define MPUT_STATE        8    /* BYU LSC */
  14. #define PASTE_IN_PROGRESS    0x4000 /* BYU LSC */
  15.  
  16. //    The following are for the "active" field.
  17. #define    CNXN_NOTINUSE    -2
  18. #define    CNXN_DNRWAIT    -1
  19. #define    CNXN_ACTIVE         0
  20. #define    CNXN_OPENING     1
  21. #define    CNXN_ISCORPSE     2
  22. #define MHOPTS_BASE        37    // Base option for {my,his}opts (Authenticate)
  23.                             //  {my,his} opts should only be used for telnet options
  24.                             //  in the range starting at MHOPTS_BASE and limited
  25.                             //  by MHOPTS_SIZE. This saves memory.
  26. #define MHOPTS_SIZE        2    // Number of options supported in {my,his}opts
  27.  
  28. #define SLC_ARRAY_SIZE    18    // This should match the value of SLC_MAX from parse.h
  29.  
  30. struct WindRec {
  31. short    
  32.     vs,                /* virtual screen number */                    /* BYU 2.4.15 */
  33.     port,            /* TCP/IP port number */
  34.     active,            /* See above for definition of possible values */
  35.     enabled,        /* Are we currently enabled for receive? */
  36.  
  37.     vtemulation,    /* 0 = VT100, 1 = VT 220 */
  38.     bsdel,            /* backspace or delete is default */
  39.     eightbit,        /* eight bit font displayed (false is seven bit display */    /* BYU 2.4.9 */
  40.     national,        /* LU/MP: translation table to use for this connection */
  41.     arrowmap,        /* MAT: should we allow the arrow keys to be mapped?? */
  42.     showErrors,        /* show ALL errors if this is set */
  43.     pgupdwn,        /* JMB/MAT: should we have page up/down do local window movement? */
  44.     emacsmeta,        /* JMB/SMB:    should option key work as EMACS meta key? */
  45.     Xterm,            /* JMB/WNR:    should Xterm sequences be recognized? */
  46.     halfdup,        /* If true then half-duplex mode */
  47.     forcesave,        /* NCSA 2.5: force lines to be saved */
  48.     crmap,            /* BYU mod - CR's second byte is ... */
  49.  
  50.     tekclear,        /* Does tektronix (1) clear screen or (0) add window */
  51.     tektype,        /* -1 = TEK not allowed, 0 = 4014, 1 = 4105 */
  52.     curgraph,        /* Associated Tek drawing */
  53.  
  54.     maxscroll,        /* Requested amount of scroll back */
  55.     width,            /* Width we started with */
  56.     wrap,            /* whether vtwrap is set or not for this screen */
  57.     echo,            /* NOTE: this is backwards - I am echoing your chars */
  58.     ESscroll,        /* will Clear Screen Save Lines? */
  59.     termstate,        /* Emulation State (-1 is none, 0 is VT100) */
  60.                     /* = TEKTYPE, send data to VGwrite */
  61.                     /* = RASTYPE, send data to VRwrite */
  62.  
  63.     naws,            /* NCSA: will negotiate NAWS */
  64.     lineAllow,        /* allow linemode? */
  65.     Isga,            /* I am supressing go ahead */
  66.     Usga,            /* You are supressing go ahead */
  67.     Ittype,            /* I am sending terminal type negotiations.. */
  68.     telstate,        /* Telnet State */
  69.     timing,            /* True if waiting for timing mark */
  70.     substat,        /* Telnet Subnegot. State */
  71.     parseIndex,        /* save an index into the subnegotiation parsed data */
  72.  
  73.     portNum,        /* port number from the application save set */
  74.     ftpport,        /* BYU mod - FTP port number */
  75.     ftpstate,        /* BYU mod - Telnet session = 0, Ftp session != 0 */
  76.     ftpnext,        /* BYU mod - Next ftpstate after waiting for response from "PORT" */
  77.     xfer,            /* File X-fer status */
  78.     kblen,            /* Pointer to next char in buffer to be used */
  79.     capturesize,    /* BYU mod - ftp client size of captured data */
  80.     clientflags;    /* BYU mod - boolean flags for ftp client */
  81.  
  82. Str63
  83.     machine;        // Name of machine we are connecting to
  84.  
  85. Str32
  86.     answerback;        /* Message to send when server sends TERMTYPE Telnet option */
  87.  
  88. /*     The following are used during paste operations */
  89. short
  90.     outlen,            /* Length of text remaining to be pasted */
  91.     pastemethod,    /* 1 = All at once, 0 = in blocks of size pasteblock */
  92.     pastesize;        /* Size of paste "blocks" */
  93.     
  94. char
  95.     *outptr,        /* Pointer to next char to send */
  96.     **outhand;        /* Handle to text from the Paste */
  97.  
  98. long   
  99.     incount,        /* BYU LSC - Count of bytes into this port */
  100.     outcount;        /* BYU LSC - Count of bytes out this port */
  101. /* ---- */
  102.  
  103. short
  104.     rows,            /* handshaking */
  105.     col,
  106.     lmode,            /* Current linemode MODE.  Currently support EDIT and TRAPSIG */
  107.     slc[SLC_ARRAY_SIZE+1];
  108.     
  109. char
  110.     TELstop,        /* Character for scrolling to stop */
  111.     TELgo,            /* Character for scrolling to go */
  112.     TELip,            /* Character for interrupt process */
  113.     ftpbuf[MAXFTP],    /* BYU mod - Outgoing ftp commands buffer */
  114.     kbbuf[MAXKB];    /* The keyboard buffer (echo mode ) */
  115.     
  116. GrafPtr 
  117.     wind;
  118.     
  119. Handle
  120.     myInitParams;    //    So we can look up stuff after we have DNS'd.
  121.  
  122.     ADATA            // Kerberos/encryption support
  123.  
  124. unsigned char
  125.     myopts[MHOPTS_SIZE],    // My telnet options. Warning: see MHOPTS_BASE
  126.     hisopts[MHOPTS_SIZE],    // His telnet options. Warning: see MHOPTS_BASE
  127.     parsedat[450];            // save the subnegotiation data here
  128.                             //   must be big enough for a Kerberos AP message
  129.  
  130. char
  131.     cannon[80];        // Cannonical hostname
  132.  
  133. Boolean
  134.     authenticate,    // true if authenticating connection wanted
  135.     encrypt;        // true if encrypting connection wanted
  136.  
  137. };
  138.  
  139. typedef struct WindRec WindRec;
  140.  
  141.